3.1132 \(\int \frac{(d+e x^2)^2 (a+b \tan ^{-1}(c x))}{x^4} \, dx\)

Optimal. Leaf size=115 \[ -\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )+\frac{b \left (c^4 d^2-6 c^2 d e-3 e^2\right ) \log \left (c^2 x^2+1\right )}{6 c}-\frac{1}{3} b c d \log (x) \left (c^2 d-6 e\right )-\frac{b c d^2}{6 x^2} \]

[Out]

-(b*c*d^2)/(6*x^2) - (d^2*(a + b*ArcTan[c*x]))/(3*x^3) - (2*d*e*(a + b*ArcTan[c*x]))/x + e^2*x*(a + b*ArcTan[c
*x]) - (b*c*d*(c^2*d - 6*e)*Log[x])/3 + (b*(c^4*d^2 - 6*c^2*d*e - 3*e^2)*Log[1 + c^2*x^2])/(6*c)

________________________________________________________________________________________

Rubi [A]  time = 0.168281, antiderivative size = 115, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {270, 4976, 12, 1251, 893} \[ -\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )+\frac{b \left (c^4 d^2-6 c^2 d e-3 e^2\right ) \log \left (c^2 x^2+1\right )}{6 c}-\frac{1}{3} b c d \log (x) \left (c^2 d-6 e\right )-\frac{b c d^2}{6 x^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)^2*(a + b*ArcTan[c*x]))/x^4,x]

[Out]

-(b*c*d^2)/(6*x^2) - (d^2*(a + b*ArcTan[c*x]))/(3*x^3) - (2*d*e*(a + b*ArcTan[c*x]))/x + e^2*x*(a + b*ArcTan[c
*x]) - (b*c*d*(c^2*d - 6*e)*Log[x])/3 + (b*(c^4*d^2 - 6*c^2*d*e - 3*e^2)*Log[1 + c^2*x^2])/(6*c)

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 4976

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^
2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] &&  !(ILtQ[(m - 1)/2, 0] && GtQ[m +
2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&
  !ILtQ[(m - 1)/2, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rubi steps

\begin{align*} \int \frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{x^4} \, dx &=-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac{-d^2-6 d e x^2+3 e^2 x^4}{3 x^3 \left (1+c^2 x^2\right )} \, dx\\ &=-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{3} (b c) \int \frac{-d^2-6 d e x^2+3 e^2 x^4}{x^3 \left (1+c^2 x^2\right )} \, dx\\ &=-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{6} (b c) \operatorname{Subst}\left (\int \frac{-d^2-6 d e x+3 e^2 x^2}{x^2 \left (1+c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{6} (b c) \operatorname{Subst}\left (\int \left (-\frac{d^2}{x^2}+\frac{d \left (c^2 d-6 e\right )}{x}+\frac{-c^4 d^2+6 c^2 d e+3 e^2}{1+c^2 x}\right ) \, dx,x,x^2\right )\\ &=-\frac{b c d^2}{6 x^2}-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{3} b c d \left (c^2 d-6 e\right ) \log (x)+\frac{b \left (c^4 d^2-6 c^2 d e-3 e^2\right ) \log \left (1+c^2 x^2\right )}{6 c}\\ \end{align*}

Mathematica [A]  time = 0.115644, size = 119, normalized size = 1.03 \[ \frac{1}{6} \left (-\frac{2 a d^2}{x^3}-\frac{12 a d e}{x}+6 a e^2 x+\frac{b \left (c^4 d^2-6 c^2 d e-3 e^2\right ) \log \left (c^2 x^2+1\right )}{c}-2 b c d \log (x) \left (c^2 d-6 e\right )-\frac{2 b \tan ^{-1}(c x) \left (d^2+6 d e x^2-3 e^2 x^4\right )}{x^3}-\frac{b c d^2}{x^2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)^2*(a + b*ArcTan[c*x]))/x^4,x]

[Out]

((-2*a*d^2)/x^3 - (b*c*d^2)/x^2 - (12*a*d*e)/x + 6*a*e^2*x - (2*b*(d^2 + 6*d*e*x^2 - 3*e^2*x^4)*ArcTan[c*x])/x
^3 - 2*b*c*d*(c^2*d - 6*e)*Log[x] + (b*(c^4*d^2 - 6*c^2*d*e - 3*e^2)*Log[1 + c^2*x^2])/c)/6

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 147, normalized size = 1.3 \begin{align*} ax{e}^{2}-2\,{\frac{aed}{x}}-{\frac{a{d}^{2}}{3\,{x}^{3}}}+b\arctan \left ( cx \right ) x{e}^{2}-2\,{\frac{b\arctan \left ( cx \right ) ed}{x}}-{\frac{b{d}^{2}\arctan \left ( cx \right ) }{3\,{x}^{3}}}+{\frac{{c}^{3}b\ln \left ({c}^{2}{x}^{2}+1 \right ){d}^{2}}{6}}-cb\ln \left ({c}^{2}{x}^{2}+1 \right ) ed-{\frac{b\ln \left ({c}^{2}{x}^{2}+1 \right ){e}^{2}}{2\,c}}-{\frac{{c}^{3}b{d}^{2}\ln \left ( cx \right ) }{3}}+2\,cb\ln \left ( cx \right ) de-{\frac{cb{d}^{2}}{6\,{x}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)^2*(a+b*arctan(c*x))/x^4,x)

[Out]

a*x*e^2-2*a*e*d/x-1/3*a*d^2/x^3+b*arctan(c*x)*x*e^2-2*b*arctan(c*x)*e*d/x-1/3*b*arctan(c*x)*d^2/x^3+1/6*c^3*b*
ln(c^2*x^2+1)*d^2-c*b*ln(c^2*x^2+1)*e*d-1/2/c*b*ln(c^2*x^2+1)*e^2-1/3*c^3*b*d^2*ln(c*x)+2*c*b*ln(c*x)*d*e-1/6*
b*c*d^2/x^2

________________________________________________________________________________________

Maxima [A]  time = 0.963767, size = 182, normalized size = 1.58 \begin{align*} \frac{1}{6} \,{\left ({\left (c^{2} \log \left (c^{2} x^{2} + 1\right ) - c^{2} \log \left (x^{2}\right ) - \frac{1}{x^{2}}\right )} c - \frac{2 \, \arctan \left (c x\right )}{x^{3}}\right )} b d^{2} -{\left (c{\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac{2 \, \arctan \left (c x\right )}{x}\right )} b d e + a e^{2} x + \frac{{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b e^{2}}{2 \, c} - \frac{2 \, a d e}{x} - \frac{a d^{2}}{3 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^4,x, algorithm="maxima")

[Out]

1/6*((c^2*log(c^2*x^2 + 1) - c^2*log(x^2) - 1/x^2)*c - 2*arctan(c*x)/x^3)*b*d^2 - (c*(log(c^2*x^2 + 1) - log(x
^2)) + 2*arctan(c*x)/x)*b*d*e + a*e^2*x + 1/2*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*e^2/c - 2*a*d*e/x - 1/3
*a*d^2/x^3

________________________________________________________________________________________

Fricas [A]  time = 1.38202, size = 311, normalized size = 2.7 \begin{align*} \frac{6 \, a c e^{2} x^{4} - b c^{2} d^{2} x - 12 \, a c d e x^{2} +{\left (b c^{4} d^{2} - 6 \, b c^{2} d e - 3 \, b e^{2}\right )} x^{3} \log \left (c^{2} x^{2} + 1\right ) - 2 \,{\left (b c^{4} d^{2} - 6 \, b c^{2} d e\right )} x^{3} \log \left (x\right ) - 2 \, a c d^{2} + 2 \,{\left (3 \, b c e^{2} x^{4} - 6 \, b c d e x^{2} - b c d^{2}\right )} \arctan \left (c x\right )}{6 \, c x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^4,x, algorithm="fricas")

[Out]

1/6*(6*a*c*e^2*x^4 - b*c^2*d^2*x - 12*a*c*d*e*x^2 + (b*c^4*d^2 - 6*b*c^2*d*e - 3*b*e^2)*x^3*log(c^2*x^2 + 1) -
 2*(b*c^4*d^2 - 6*b*c^2*d*e)*x^3*log(x) - 2*a*c*d^2 + 2*(3*b*c*e^2*x^4 - 6*b*c*d*e*x^2 - b*c*d^2)*arctan(c*x))
/(c*x^3)

________________________________________________________________________________________

Sympy [A]  time = 2.52562, size = 180, normalized size = 1.57 \begin{align*} \begin{cases} - \frac{a d^{2}}{3 x^{3}} - \frac{2 a d e}{x} + a e^{2} x - \frac{b c^{3} d^{2} \log{\left (x \right )}}{3} + \frac{b c^{3} d^{2} \log{\left (x^{2} + \frac{1}{c^{2}} \right )}}{6} - \frac{b c d^{2}}{6 x^{2}} + 2 b c d e \log{\left (x \right )} - b c d e \log{\left (x^{2} + \frac{1}{c^{2}} \right )} - \frac{b d^{2} \operatorname{atan}{\left (c x \right )}}{3 x^{3}} - \frac{2 b d e \operatorname{atan}{\left (c x \right )}}{x} + b e^{2} x \operatorname{atan}{\left (c x \right )} - \frac{b e^{2} \log{\left (x^{2} + \frac{1}{c^{2}} \right )}}{2 c} & \text{for}\: c \neq 0 \\a \left (- \frac{d^{2}}{3 x^{3}} - \frac{2 d e}{x} + e^{2} x\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)**2*(a+b*atan(c*x))/x**4,x)

[Out]

Piecewise((-a*d**2/(3*x**3) - 2*a*d*e/x + a*e**2*x - b*c**3*d**2*log(x)/3 + b*c**3*d**2*log(x**2 + c**(-2))/6
- b*c*d**2/(6*x**2) + 2*b*c*d*e*log(x) - b*c*d*e*log(x**2 + c**(-2)) - b*d**2*atan(c*x)/(3*x**3) - 2*b*d*e*ata
n(c*x)/x + b*e**2*x*atan(c*x) - b*e**2*log(x**2 + c**(-2))/(2*c), Ne(c, 0)), (a*(-d**2/(3*x**3) - 2*d*e/x + e*
*2*x), True))

________________________________________________________________________________________

Giac [A]  time = 1.09679, size = 232, normalized size = 2.02 \begin{align*} \frac{b c^{4} d^{2} x^{3} \log \left (c^{2} x^{2} + 1\right ) - 2 \, b c^{4} d^{2} x^{3} \log \left (x\right ) - 6 \, b c^{2} d x^{3} e \log \left (c^{2} x^{2} + 1\right ) + 12 \, b c^{2} d x^{3} e \log \left (x\right ) + 6 \, b c x^{4} \arctan \left (c x\right ) e^{2} + 6 \, a c x^{4} e^{2} - 12 \, b c d x^{2} \arctan \left (c x\right ) e - b c^{2} d^{2} x - 12 \, a c d x^{2} e - 3 \, b x^{3} e^{2} \log \left (c^{2} x^{2} + 1\right ) - 2 \, b c d^{2} \arctan \left (c x\right ) - 2 \, a c d^{2}}{6 \, c x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^4,x, algorithm="giac")

[Out]

1/6*(b*c^4*d^2*x^3*log(c^2*x^2 + 1) - 2*b*c^4*d^2*x^3*log(x) - 6*b*c^2*d*x^3*e*log(c^2*x^2 + 1) + 12*b*c^2*d*x
^3*e*log(x) + 6*b*c*x^4*arctan(c*x)*e^2 + 6*a*c*x^4*e^2 - 12*b*c*d*x^2*arctan(c*x)*e - b*c^2*d^2*x - 12*a*c*d*
x^2*e - 3*b*x^3*e^2*log(c^2*x^2 + 1) - 2*b*c*d^2*arctan(c*x) - 2*a*c*d^2)/(c*x^3)